package com.wteam.dragon.shop.search.bean;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableLogic;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import lombok.EqualsAndHashCode;
import org.springframework.data.elasticsearch.annotations.Field;
import org.springframework.data.elasticsearch.annotations.FieldType;

import java.io.Serializable;

/**
 * @Author 陈晓辉
 * @Date 2021/3/27 9:17
 */
@Data
@EqualsAndHashCode
@TableName("product_product_attribute")
public class EsProductAttributeValue implements Serializable {
    private Long id;

    private Long productId;

    private Long productAttributeId;

    /**
     * 属性参数 0 规格 1 参数
     */
    @TableField(exist = false)
    private Integer type;

    /**
     * 属性名称
     */
    @TableField(exist = false)
    @Field(type=FieldType.Keyword)
    private String name;

    /**
     * 属性值
     */
    @Field(type = FieldType.Keyword)
    private String value;

    @TableLogic
    private Boolean isDelete;
}
